function [outMSE outPSNR] = imMSE(M1,M2);

outMSE = mean(mean((double(M1) - double(M2)).^2));
outPSNR = 10*log10(255/outMSE);
end